package View;

import java.awt.Font;
import java.awt.event.ActionListener;

import javax.swing.*;
import java.awt.event.ActionEvent;

public class WorkerMainMenuView extends JFrame {
	JButton EnterNewCustomerButton;
	JButton NewMarketingPatternButton;
	JButton ProductToCatalogButton;
	JButton RunSaleButton;
	JButton HandleSaleButton;
	JButton ReportsButton;
	JButton HandleCatalogButton;
	JButton LogOutButton;
	JButton UpdateCustomerButton; 	//hila
	
	
	
	
	public WorkerMainMenuView() {
		getContentPane().setLayout(null);
		
		EnterNewCustomerButton = new JButton("Enter New Cutomer");
		EnterNewCustomerButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		EnterNewCustomerButton.setBounds(44, 11, 322, 23);
		getContentPane().add(EnterNewCustomerButton);
		
		 NewMarketingPatternButton = new JButton("Configure New Marketing Pattern");
		NewMarketingPatternButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		NewMarketingPatternButton.setBounds(44, 80, 322, 23);
		getContentPane().add(NewMarketingPatternButton);
		
		 ProductToCatalogButton = new JButton("Add Product To Catalog");
		ProductToCatalogButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		ProductToCatalogButton.setBounds(44, 114, 322, 23);
		getContentPane().add(ProductToCatalogButton);
		
		 RunSaleButton = new JButton("Run Sale");
		RunSaleButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		RunSaleButton.setBounds(44, 148, 322, 23);
		getContentPane().add(RunSaleButton);
		
		 HandleSaleButton = new JButton("Handle New Sale");
		HandleSaleButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		HandleSaleButton.setBounds(44, 216, 322, 23);
		getContentPane().add(HandleSaleButton);
		
		 ReportsButton = new JButton("Reports");
		ReportsButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		ReportsButton.setBounds(44, 250, 322, 23);
		getContentPane().add(ReportsButton);
		
		 
		
		 HandleCatalogButton = new JButton("Handle Catalog");
		 HandleCatalogButton.addActionListener(new ActionListener() {
		 	public void actionPerformed(ActionEvent arg0) {
		 	}
		 });
		HandleCatalogButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		HandleCatalogButton.setBounds(44, 182, 322, 23);
		getContentPane().add(HandleCatalogButton);
		
		LogOutButton = new JButton("LogOut");
		LogOutButton.setFont(new Font("Rockwell", Font.BOLD, 18));
		LogOutButton.setBounds(123, 290, 115, 23);
		getContentPane().add(LogOutButton);
		
		
		//hila
		UpdateCustomerButton= new JButton("Update Customer");
		UpdateCustomerButton.setFont(new Font("Tahoma", Font.BOLD, 16));
		UpdateCustomerButton.setBounds(44, 45, 322, 23);
		getContentPane().add(UpdateCustomerButton);
		
		//End hila
		
		
		setTitle("Main Menu");
		
		this.setSize(400, 400);
		this.setResizable(false);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
	public void showWindow(){
		setVisible(true);
	}
	

	public void hideWindow(){
		setVisible(false);
	}
	
	public void addWorkerMainMenuListener(ActionListener actionListener){
		EnterNewCustomerButton.addActionListener(actionListener);
		NewMarketingPatternButton.addActionListener(actionListener);
		ProductToCatalogButton.addActionListener(actionListener);
		RunSaleButton.addActionListener(actionListener);
		HandleSaleButton.addActionListener(actionListener);
		ReportsButton.addActionListener(actionListener);
		HandleCatalogButton.addActionListener(actionListener);
		LogOutButton.addActionListener(actionListener);
		UpdateCustomerButton.addActionListener(actionListener);
	}

	public JButton getEnterNewCustomerBtn() {
		return  EnterNewCustomerButton;
	}
	
	public JButton getNewPatternBtn() {
		return  NewMarketingPatternButton;
	}
	
	public JButton getProductToCatalogBtn() {
		return  ProductToCatalogButton;
	}
	
	public JButton getRunSaleBtn() {
		return  RunSaleButton;
	}
	
	public JButton getHandleSaleBtn() {
		return  HandleSaleButton;
	}
	
	public JButton getReportsnBtn() {
		return  ReportsButton;
	}
	
	public JButton getHandleCatalogBtn() {
		return  HandleCatalogButton;
	}
	
	
	public JButton getLogoutBtn(){
		return LogOutButton;
	}
	
	public JButton getUpdateCustomerBtn(){
		return UpdateCustomerButton;
	}
	
	

}